package com.maochd.cloud.excel.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("import_record")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "ImportRecord对象", description = "导入记录")
public class ImportRecord extends Model<ImportRecord> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "文件名称")
    @TableField("file_name")
    private String fileName;

    @ApiModelProperty(value = "导入类型")
    @TableField("import_type")
    private Integer importType;

    @ApiModelProperty(value = "成功数量")
    @TableField("success_count")
    private Integer successCount;

    @ApiModelProperty(value = "失败数量")
    @TableField("fail_count")
    private Integer failCount;

    @ApiModelProperty(value = "状态 0为导入中，1为导入成功，2为导入失败, 3为异常")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "操作人")
    @TableField("operator")
    private String operator;

    @ApiModelProperty(value = "失败文件下载链接")
    @TableField("fail_file_url")
    private String failFileUrl;

    @ApiModelProperty(value = "失败原因")
    @TableField("fail_reason")
    private String failReason;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;


}
